Skip to content

Conversation

@shreddedbacon
Copy link
Member

@shreddedbacon shreddedbacon commented Sep 30, 2025

Build support for uselagoon/lagoon#3990

@shreddedbacon shreddedbacon marked this pull request as ready for review October 27, 2025 20:24
@bomoko bomoko requested review from bomoko and Copilot October 29, 2025 00:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements comprehensive route management features for the Lagoon build-deploy tool, introducing API-defined routes, route source tracking, and automated cleanup of removed routes. The implementation adds support for distinguishing between routes from different sources (API, YAML, autogenerated) and includes logic for automatic cleanup when routes are managed via the API.

  • Adds route source tracking via route.lagoon.sh/source label to distinguish between API, YAML, and autogenerated routes
  • Implements API-managed route cleanup functionality that automatically removes routes not defined in API or .lagoon.yml
  • Introduces support for primary route designation and active/standby route types from the API

Reviewed Changes

Copilot reviewed 95 out of 95 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
legacy/build-deploy-docker-compose.sh Adds internalSystemEnvVarCheck function and implements conditional route cleanup logic based on API route management
internal/lagoon/routes.go Adds Source, Primary, and Type fields to RouteV2 with custom UnmarshalJSON to handle API/YAML field name differences
internal/generator/ingress.go Updates route generation to support API routes via LAGOON_API_ROUTES variable and primary route selection logic
internal/templating/templates_ingress.go Adds route source label to ingress templates based on route origin
internal/generator/generator.go Implements autogenerated route configuration from API via LAGOON_API_AUTOGENERATED_CONFIG
Test files (multiple) Updates test expectations with new route source labels and adds test coverage for API-defined routes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rocketeerbkw
Copy link
Member

Looks good from a code review perspective, withholding full review for related PRs.

@rocketeerbkw rocketeerbkw merged commit 00cae0a into main Nov 3, 2025
2 checks passed
@rocketeerbkw rocketeerbkw deleted the lagoon-api-routes branch November 3, 2025 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants